<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button onclick="suprise()">点我有惊喜</button>
    <script>
        var v = 1000;
        var b = true;
        var d = 3.1415926
        var s = '123456'
        var s = "9988776"
        var l = 6666666
        console.log(v);
        function suprise() {
            alert("你爹来了" + v);
        }

        var year = 2001;
        var years = ((year % 4 === 0 && year % 100 != 0) || year % 400 === 0) ? '是闰年':'不是闰年';
        console.log(years);
        
        if ((year % 4 === 0 && year % 100 != 0) || year % 400 === 0) {
            console.log("是闰年");
        } else {
            console.log("不是闰年");
        }
        var num = 89;
        if (num <= 100 && num > 89) {
            console.log('A');
        } else if (num <= 89 && num > 79) {
            console.log('B');
        } else if (num <= 79 && num > 69) {
            console.log('C');
        } else if (num <= 69 && num > 59) {
            console.log('D');
        } else {
            console.log('E');
        }

        var number = 89;
        number = Math.floor(number / 10);
        switch (number) {
            case 10:
                console.log('A');
                break;
            case 9:
                console.log('A');
                break;
            case 8:
                console.log('B');
                break;
            case 7:
                console.log('C');
                break;
            case 6:
                console.log('D');
                break;
            default:
                console.log('E');
                break;
                
        }
        document.write("<br>");

        for(var i = 1; i <= 5; i++){
            for(var j = 1; j <= i;j++){
                document.write('*')
            }
            document.write("<br>");
        }
        document.write("<br>")
        for(var i = 1;i <= 9; i++){
            for(var j = 1; j <= i; j++){
                document.write(j + "*" + i + "=" + (i * j) + '&nbsp;&nbsp;&nbsp;&nbsp;');
            }
            document.write("<br>");
        }
        document.write("<br>");
        l:for(var i = 2; i <= 100; i++){
            for(var j = 2; j < i; j++){
                if(i % j == 0){
                    continue l;
                }
            }
            document.write(i + " ,  ");
        }


        
    </script>
</body>

</html>